<!DOCTYPE html>
<html>
<head>
<title></title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link href="../../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../../css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../../css/style.css?v=4.1.0" rel="stylesheet">
    <!-- jqgrid-->
    <link href="../../css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
    <!-- ztree -->
    <link rel="stylesheet" href="../../js/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../js/plugins/layer/layer.min.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <!-- jqGrid -->
    <script src="../../js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
    <script src="../../js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
    <script src="../../js/plugins/layer/laydate/laydate.js"></script>
    <script src="../../js/vee-validate/dist/vee-validate.js"></script>
    <script src="../../js/vee-validate/dist/locale/zh_CN.js"></script>
    <!-- ztree -->
    <script type="text/javascript" src="../../js/zTree/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="../../js/zTree/js/jquery.ztree.excheck.js"></script>
    <script type="text/javascript" src="../../js/zTree/js/jquery.ztree.exedit.js"></script>
    <script src="../../js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div class="wrapper wrapper-content  animated fadeInshop_right">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox ">
                    <div class="ibox-content">
                        <div class="ibox-content">
                            <form role="form" class="form-inline" style="text-align:right;">
                                    <select v-model='q.pushPre' class='form-control'>
                                        <option value=''>全部</option>
                                        <option value='1'>已在预发布执行</option>
                                        <option value='0'>未在预发布执行</option>
                                    </select>
                                    <!--<select v-model='q.module' class='form-control'>-->
                                        <!--<option value='mall-base'>mall-base</option>-->
                                        <!--<option value='mall-goods'>mall-goods</option>-->
                                        <!--<option value='mall-trade'>mall-trade</option>-->
                                        <!--<option value='mall-customer'>mall-customer</option>-->
                                        <!--<option value='mall-service'>mall-service</option>-->
                                        <!--<option value='vr-markingcenter'>vr-markingcenter</option>-->
                                        <!--<option value='vr-authentication'>vr-authentication</option>-->
                                        <!--<option value='yn-authentication'>yn-authentication</option>-->
                                        <!--<option value='ynbc'>ynbc</option>-->
                                        <!--<option value='vr-njxs-mall'>vr-njxs-mall</option>-->
                                    <!--</select>-->
                                    <select v-model='q.module'   class='form-control'>
                                        <option  v-for="dic  in dicList" :value="dic.codeText" >{{dic.codeText}}</option>
                                    </select>
									<a class="btn btn-sm btn-default" @click="query">&nbsp;查询</a>
									<a  class="btn btn-sm btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
									<a  class="btn btn-sm btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                                    <a  class="btn btn-sm btn-danger" @click="push_pre"><i class="fa fa-pencil-square-o"></i>&nbsp;预发布执行</a>
									<!--<a  class="btn btn-sm btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
                            </form>
                        </div>
                        <div class="jqGrid_wrapper">
                            <table id="jqGrid"></table>
                            <div id="jqGridPager"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="option_list" class="modal in" data-backdrop="static" data-keyboard="false" aria-hidden="true" >
        <div class="modal-dialog" style="width: 780px;">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h5>{{title}}</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal" id="optionForm">
																														                                    <div class="form-group">
                                        <div class="col-sm-2 control-label">所属项目</div>
                                        <div class="col-sm-10">
                                            <select v-model='pushSql.project' @change='changeType' placeholder="所属项目" class='form-control'>
                                            <option  v-for="dic  in projectDicList" :value="dic.codeText" >{{dic.codeText}}</option>
                                            </select>
                                        </div>
                                    </div>
									   <div class="form-group">
                                        <div class="col-sm-2 control-label">所属数据库</div>
                                        <div class="col-sm-10">
                                            <!--<select v-model='pushSql.module' @change='changeType' class='form-control'>-->
                                                <!--<option value='mall-base'>mall-base</option>-->
                                                <!--<option value='mall-goods'>mall-goods</option>-->
                                                <!--<option value='mall-trade'>mall-trade</option>-->
                                                <!--<option value='mall-customer'>mall-customer</option>-->
                                                <!--<option value='mall-service'>mall-service</option>-->
                                                <!--<option value='vr-markingcenter'>vr-markingcenter</option>-->
                                                <!--<option value='vr-authentication'>vr-authentication</option>-->
                                                <!--<option value='yn-authentication'>yn-authentication</option>-->
                                                <!--<option value='ynbc'>ynbc</option>-->
                                                <!--<option value='vr-njxs-mall'>vr-njxs-mall</option>-->
                                            <!--</select>-->
                                            <select v-model='pushSql.module' @change='changeType'  class='form-control'>
                                                <option  v-for="dic  in dicList" :value="dic.codeText" >{{dic.codeText}}</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-2 control-label">需执行sql</div>
                                        <div class="col-sm-10">
                                            <textarea rows="8" v-model="pushSql.pushSql" class="form-control"></textarea>
                                        </div>
                                    </div>
									<div class="form-group">
                                        <div class="col-sm-2 control-label">sql描述</div>
                                        <div class="col-sm-10">
                                            <textarea rows="4" v-model="pushSql.describe" class="form-control"></textarea>
                                        </div>
                                    </div>
									<div class="form-group">
                                        <div class="col-sm-2 control-label">发布人</div>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" v-validate="'required|min:3'" :class="{'input': true, 'is-danger': errors.has('createUser') }" name="createUser" v-model="pushSql.createUser" placeholder="发布人"/>
                                            <span v-show="errors.has('createUser')" style="display:none;color: red;font-size: 12px;">{{ errors.first('createUser') }}</span>

                                        </div>
                                    </div>
								<div class="form-group">
                                <div class="col-sm-2 control-label"></div>
                                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="关闭"/>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="option_push_pre" class="modal fade" data-backdrop="static" data-keyboard="false" aria-hidden="true">
        <div class="modal-dialog">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h5>{{title}}</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal" id="optionPushPreForm">
                            <div class="form-group">
                                <div class="col-sm-2 control-label">执行人</div>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" v-model="pushSql.executor" placeholder="执行人"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2 control-label">预发布版本标记</div>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" v-model="pushSql.executorTag" placeholder="预发布版本标记"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2 control-label"></div>
                                <input type="button" class="btn btn-primary" @click="pushPre" value="确定"/>
                                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="关闭"/>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="../../js/modules/publish/pushsql_veevalidate.js"></script>

</body>
</html>